(function() {
    var isBrowser = !!this.seajs;
    var  cfg = {
            vars: {
                'locale': isBrowser ? SESSION.user.language : ''
            },
            alias: {
                'rk': 'crm/core/rkloader',
                //'fancymap': 'lib/fancymap.js',
                //'commonjs': 'core/widgets/common.js',
                //'globaljs': 'core/widgets/global.js',
                //'userService': 'core/services/2.0/rk_userService',
                //'workreportService': 'core/services/2.0/rk_workreportService',
                //'noticeService': 'core/services/biz/noticeService',
                //'xsy': 'platform/core/xsyloader',
                //'scheduleService': 'core/services/biz/scheduleService'
            }
        };
    if (this.seajs ) {
        //seajs.data.dev = !!SESSION.isDev || ~location.search.indexOf('?develop');
        seajs.data.dev = true;
        if (seajs.data.dev) {
            seajs.data.time0 = new Date(); //performance
            cfg.debug = true;
            //cfg.base = SESSION.resDomain + '/static/source/';
            cfg.base = SESSION.resDomain;
        } else {
            cfg.debug = false;
            cfg.base = SESSION.resDomain + '/static/deploy/';
            var vMap = /*map start*/ {} /*map end*/ ;
            cfg.map = [function(uri) {
                var id = uri.split('/static/deploy/')[1];
                return vMap[id] ? [uri, vMap[id]].join('?') : uri;
            }];
        }

        seajs.config(cfg);
    } else {
        return cfg;
    }
}).call(this);
